<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>TURN Server: turn::StunAttr Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">TURN Server
   &#160;<span id="projectnumber">1.5</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceturn.html">turn</a>      </li>
      <li class="navelem"><a class="el" href="classturn_1_1StunAttr.html">StunAttr</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-static-methods">Static Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">turn::StunAttr Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for turn::StunAttr:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classturn_1_1StunAttr.png" usemap="#turn::StunAttr_map" alt=""/>
  <map id="turn::StunAttr_map" name="turn::StunAttr_map">
<area href="classturn_1_1StunAttrAddr.html" alt="turn::StunAttrAddr" shape="rect" coords="0,56,186,80"/>
<area href="classturn_1_1StunAttrChangeRequest.html" alt="turn::StunAttrChangeRequest" shape="rect" coords="196,56,382,80"/>
<area href="classturn_1_1StunAttrChannelNumber.html" alt="turn::StunAttrChannelNumber" shape="rect" coords="392,56,578,80"/>
<area href="classturn_1_1StunAttrEvenPort.html" alt="turn::StunAttrEvenPort" shape="rect" coords="588,56,774,80"/>
<area href="classturn_1_1StunAttrPadding.html" alt="turn::StunAttrPadding" shape="rect" coords="784,56,970,80"/>
<area href="classturn_1_1StunAttrReservationToken.html" alt="turn::StunAttrReservationToken" shape="rect" coords="980,56,1166,80"/>
<area href="classturn_1_1StunAttrResponsePort.html" alt="turn::StunAttrResponsePort" shape="rect" coords="1176,56,1362,80"/>
</map>
 </div></div>

<p><a href="classturn_1_1StunAttr-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa31465ae7cf4f3664f8e30bc6f7bfb72"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunAttr.html#aa31465ae7cf4f3664f8e30bc6f7bfb72">StunAttr</a> ()</td></tr>
<tr class="memitem:abaa18332f0ca717f9284f96e3595368f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunAttr.html#abaa18332f0ca717f9284f96e3595368f">StunAttr</a> (const <a class="el" href="classturn_1_1StunAttrIterator.html">StunAttrIterator</a> &amp;iter)  throw (WrongStunAttrFormatException, EndOfStunMsgException)</td></tr>
<tr class="memitem:a4c0c6e6932d150bacfe7809b9d86414d"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunAttr.html#a4c0c6e6932d150bacfe7809b9d86414d">~StunAttr</a> ()</td></tr>
<tr class="memitem:aa3d87060e2c64d41727889ca3c7bccba"><td class="memItemLeft" align="right" valign="top">const u08bits *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunAttr.html#aa3d87060e2c64d41727889ca3c7bccba">getRawValue</a> (size_t &amp;sz) const </td></tr>
<tr class="memitem:a53f4ac3bbad98840a540b0cb9fd0b702"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunAttr.html#a53f4ac3bbad98840a540b0cb9fd0b702">setRawValue</a> (u08bits *value, size_t sz)  throw (WrongStunAttrFormatException)</td></tr>
<tr class="memitem:a17596ddd85176f2fe14b9ef2ccdd4640"><td class="memItemLeft" align="right" valign="top">u16bits&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunAttr.html#a17596ddd85176f2fe14b9ef2ccdd4640">getType</a> () const </td></tr>
<tr class="memitem:a3b4c326f288d2a0b1b7288db573eef92"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunAttr.html#a3b4c326f288d2a0b1b7288db573eef92">setType</a> (u16bits at)</td></tr>
<tr class="memitem:aab1f7b44700245718baa1fb12169ac90"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:aab1f7b44700245718baa1fb12169ac90"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classturn_1_1StunAttr.html#aab1f7b44700245718baa1fb12169ac90">addToMsg</a> (T &amp;msg)  throw (WrongStunAttrFormatException, WrongStunBufferFormatException)</td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:ac0e3317f4db852b848ed156e14e38134"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunAttr.html#ac0e3317f4db852b848ed156e14e38134">addToBuffer</a> (u08bits *buffer, size_t &amp;sz)  throw (WrongStunAttrFormatException, WrongStunBufferFormatException)</td></tr>
<tr><td colspan="2"><h2><a name="pro-static-methods"></a>
Static Protected Member Functions</h2></td></tr>
<tr class="memitem:a2d7219513d0a946907b0a2402132ddff"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="ns__turn__msg_8h.html#ad78e84b431d789f6799b3dabf786e032">stun_attr_ref</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classturn_1_1StunAttr.html#a2d7219513d0a946907b0a2402132ddff">getSar</a> (const <a class="el" href="classturn_1_1StunAttrIterator.html">StunAttrIterator</a> &amp;iter)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Root class of all STUN attributes. Can be also used for a generic attribute object. </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00189">189</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aa31465ae7cf4f3664f8e30bc6f7bfb72"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classturn_1_1StunAttr.html#aa31465ae7cf4f3664f8e30bc6f7bfb72">turn::StunAttr::StunAttr</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Empty constructor </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00194">194</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">: _attr_type(0), _value(0), _sz(0) {}
</pre></div>
</div>
</div>
<a class="anchor" id="abaa18332f0ca717f9284f96e3595368f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classturn_1_1StunAttr.html#aa31465ae7cf4f3664f8e30bc6f7bfb72">turn::StunAttr::StunAttr</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classturn_1_1StunAttrIterator.html">StunAttrIterator</a> &amp;&#160;</td>
          <td class="paramname"><em>iter</em></td><td>)</td>
          <td>  throw (<a class="el" href="classturn_1_1WrongStunAttrFormatException.html">WrongStunAttrFormatException</a>, <a class="el" href="classturn_1_1EndOfStunMsgException.html">EndOfStunMsgException</a>)<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructs attribute from iterator </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00199">199</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                                                          {
                <span class="keywordflow">if</span>(iter.eof()) {
                        <span class="keywordflow">throw</span> EndOfStunMsgException();
                }
                <span class="keywordtype">size_t</span> sz = 0;
                <span class="keyword">const</span> u08bits *ptr = iter.getRawBuffer(sz);
                <span class="keywordflow">if</span>(sz&gt;=0xFFFF)
                        <span class="keywordflow">throw</span> WrongStunAttrFormatException();
                <span class="keywordtype">int</span> at = iter.getType();
                <span class="keywordflow">if</span>(at&lt;0)
                        <span class="keywordflow">throw</span> WrongStunAttrFormatException();
                _attr_type = (u16bits)at;
                _sz = sz;
                _value=(u08bits*)turn_malloc(_sz);
                <span class="keywordflow">if</span>(ptr)
                        ns_bcopy(ptr,_value,_sz);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a4c0c6e6932d150bacfe7809b9d86414d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classturn_1_1StunAttr.html#a4c0c6e6932d150bacfe7809b9d86414d">turn::StunAttr::~StunAttr</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Destructor </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00220">220</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                            {
                <span class="keywordflow">if</span>(_value)
                        turn_free(_value,_sz);
        }
</pre></div>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ac0e3317f4db852b848ed156e14e38134"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int <a class="el" href="classturn_1_1StunAttr.html#ac0e3317f4db852b848ed156e14e38134">turn::StunAttr::addToBuffer</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t &amp;&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>  throw (<a class="el" href="classturn_1_1WrongStunAttrFormatException.html">WrongStunAttrFormatException</a>, <a class="el" href="classturn_1_1WrongStunBufferFormatException.html">WrongStunBufferFormatException</a>)<code> [inline, protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Virtual function member to add attribute to a raw buffer </p>

<p>Reimplemented in <a class="el" href="classturn_1_1StunAttrPadding.html#a071922e9e06c84f9a21592c201cee1c9">turn::StunAttrPadding</a>, <a class="el" href="classturn_1_1StunAttrResponsePort.html#a6360780c7dc8fc596ce0bab436a98269">turn::StunAttrResponsePort</a>, <a class="el" href="classturn_1_1StunAttrChangeRequest.html#a166da020f6b0c12b3f833f4841acdde9">turn::StunAttrChangeRequest</a>, <a class="el" href="classturn_1_1StunAttrAddr.html#afd54e3d2f0f8a6812b5a6803377a603b">turn::StunAttrAddr</a>, <a class="el" href="classturn_1_1StunAttrReservationToken.html#a102c8acb5c9a7b0f17fe25063769d4af">turn::StunAttrReservationToken</a>, <a class="el" href="classturn_1_1StunAttrEvenPort.html#aa88c8a9d6f5c5d72e228fee45cb1b298">turn::StunAttrEvenPort</a>, and <a class="el" href="classturn_1_1StunAttrChannelNumber.html#a5c99a52e89ce041f30df43857f4b86fd">turn::StunAttrChannelNumber</a>.</p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00284">284</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                                                                                 {
                <span class="keywordflow">if</span>(buffer) {
                        <span class="keywordflow">if</span>(!_value)
                                <span class="keywordflow">throw</span> WrongStunAttrFormatException();
                        <span class="keywordflow">if</span>(<a class="code" href="ns__turn__msg_8h.html#a66ee2e33b2311217a586165c02a6507b">stun_attr_add_str</a>(buffer, &amp;sz, _attr_type, _value, _sz)&lt;0) {
                                <span class="keywordflow">throw</span> WrongStunBufferFormatException();
                        }
                        <span class="keywordflow">return</span> 0;
                }
                <span class="keywordflow">throw</span> WrongStunBufferFormatException();
        }
</pre></div>
</div>
</div>
<a class="anchor" id="aab1f7b44700245718baa1fb12169ac90"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classturn_1_1StunAttr.html#aab1f7b44700245718baa1fb12169ac90">turn::StunAttr::addToMsg</a> </td>
          <td>(</td>
          <td class="paramtype">T &amp;&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td>  throw (<a class="el" href="classturn_1_1WrongStunAttrFormatException.html">WrongStunAttrFormatException</a>, <a class="el" href="classturn_1_1WrongStunBufferFormatException.html">WrongStunBufferFormatException</a>)<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Add attribute to a message </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00265">265</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                                                 {
                <span class="keywordflow">if</span>(!_attr_type)
                        <span class="keywordflow">throw</span> WrongStunAttrFormatException();
                u08bits *buffer = msg.getRawBuffer();
                <span class="keywordflow">if</span>(buffer) {
                        <span class="keywordtype">size_t</span> sz = msg.getSize();
                        <span class="keywordflow">if</span>(<a class="code" href="classturn_1_1StunAttr.html#ac0e3317f4db852b848ed156e14e38134">addToBuffer</a>(buffer, sz)&lt;0) {
                                <span class="keywordflow">throw</span> WrongStunBufferFormatException();
                        }
                        msg.setSize(sz);
                        <span class="keywordflow">return</span> 0;
                }
                <span class="keywordflow">throw</span> WrongStunBufferFormatException();
        }
</pre></div>
</div>
</div>
<a class="anchor" id="aa3d87060e2c64d41727889ca3c7bccba"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const u08bits* <a class="el" href="classturn_1_1StunAttr.html#aa3d87060e2c64d41727889ca3c7bccba">turn::StunAttr::getRawValue</a> </td>
          <td>(</td>
          <td class="paramtype">size_t &amp;&#160;</td>
          <td class="paramname"><em>sz</em></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Return raw data representation of the attribute </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00228">228</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                     {
                sz=_sz;
                <span class="keywordflow">return</span> _value;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a2d7219513d0a946907b0a2402132ddff"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="ns__turn__msg_8h.html#ad78e84b431d789f6799b3dabf786e032">stun_attr_ref</a> <a class="el" href="classturn_1_1StunAttr.html#a2d7219513d0a946907b0a2402132ddff">turn::StunAttr::getSar</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classturn_1_1StunAttrIterator.html">StunAttrIterator</a> &amp;&#160;</td>
          <td class="paramname"><em>iter</em></td><td>)</td>
          <td><code> [inline, static, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get low-level iterator object </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00299">299</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                  {
                <span class="keywordflow">return</span> iter._sar;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a17596ddd85176f2fe14b9ef2ccdd4640"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u16bits <a class="el" href="classturn_1_1StunAttr.html#a17596ddd85176f2fe14b9ef2ccdd4640">turn::StunAttr::getType</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get attribute type </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00250">250</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                {
                <span class="keywordflow">return</span> _attr_type;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a53f4ac3bbad98840a540b0cb9fd0b702"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classturn_1_1StunAttr.html#a53f4ac3bbad98840a540b0cb9fd0b702">turn::StunAttr::setRawValue</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>  throw (<a class="el" href="classturn_1_1WrongStunAttrFormatException.html">WrongStunAttrFormatException</a>)<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set raw data value </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00236">236</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                                        {
                <span class="keywordflow">if</span>(sz&gt;0xFFFF)
                        <span class="keywordflow">throw</span> WrongStunAttrFormatException();
                <span class="keywordflow">if</span>(_value)
                        turn_free(_value,_sz);
                _sz = sz;
                _value=(u08bits*)turn_malloc(_sz);
                <span class="keywordflow">if</span>(value)
                        ns_bcopy(value,_value,_sz);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a3b4c326f288d2a0b1b7288db573eef92"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classturn_1_1StunAttr.html#a3b4c326f288d2a0b1b7288db573eef92">turn::StunAttr::setType</a> </td>
          <td>(</td>
          <td class="paramtype">u16bits&#160;</td>
          <td class="paramname"><em>at</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set attribute type </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00257">257</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                 {
                _attr_type = at;
        }
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/client++/<a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a></li>
</ul>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Tue Jan 22 2013 14:23:54 for TURN Server by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
